package edu.deltacollege.portal.portlets.emailpreview;

import javax.mail.Folder;
import javax.mail.MessagingException;

/**
 * Encapsulates email message lookup for a given folder.
 */
public interface EmailMessageDAO {
    
    /**
     * Does this <code>EmailMessageDAO</code> support the configuration
     * of the given <code>AccountInfoDAO</code>
     * 
     * @param accountInfoDAO
     * @return
     */
    public boolean supports(AccountInfoDAO accountInfoDAO);
    
    public EmailMessageLookupResult getUnreadEmailMessages(Folder mailFolder) 
        throws MessagingException;

    public int getTotalEmailMessageCount(Folder inbox) 
        throws MessagingException;

}
